package com.bilibili.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bilibili.domain.entity.RefreshToken;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
* @author www
* @description 针对表【t_refresh_token(刷新令牌记录表)】的数据库操作Mapper
* @createDate 2024-06-12 10:37:37
* @Entity generator.domain.RefreshToken
*/
@Mapper
public interface RefreshTokenMapper extends BaseMapper<RefreshToken> {

    Integer deleteRefreshToken(@Param("refreshToken") String refreshToken,
                               @Param("userId") Long userId);

    Integer addRefreshToken(@Param("refreshToken") String refreshToken,
                            @Param("userId")Long userId,
                            @Param("createTime") Date createTime);

    RefreshToken getRefreshTokenDetail(String refreshToken);
}




